home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
wdj0797.zip
/
TUFFS.ZIP
/
WARNING.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-22
|
653b
|
19 lines
// File: warning.cpp
// Description: Issue a warning about impending unsafe operations and ask
// for permission to proceed.
#include <stdlib.h>
#include <iostream.h>
#include "warning.h"
char IssueWarning()
{
cout << "WARNING: This program is about to generate an unhandled system exception" << endl;
cout << "WARNING: This may result in your operating system becoming unstable" << endl;
cout << "WARNING: You should save any work in progress in case you need to reboot" << endl;
cout << "Press 'y' to continue, 'n' to abort: ";
char answer;
cin >> answer;
if (answer != 'y') exit(0);
return 0;
}